/*******************************************************************\
| RayTraceRecorder.h
|
| CREATED:		25.6.2009
| DESCRIPTION:
| 
| Records ray tracing steps for GPU kNN search at the end
\********************************************************************/
#ifndef RAYTRACERECORDER_H
#define RAYTRACERECORDER_H

namespace PhotonMapping
{

//*****************************************************************************
// class overview:
//   
//-----------------------------------------------------------------------------
class RayTraceRecorder
{
	public:
		inline void Add(const Math::Vector3& p_Pos, const Color& p_Factor, Color* p_Out);

	public:
		std::vector<Math::Vector3> m_QueryPoints;
		std::vector<Color> m_Factors;
		std::vector<Color*> m_BufferOut;
};

inline void RayTraceRecorder::Add(const Math::Vector3& p_Pos, const Color& p_Factor, Color* p_Out)
{
	m_QueryPoints.push_back(p_Pos);
	m_Factors.push_back(p_Factor);
	m_BufferOut.push_back(p_Out);
}

typedef std::tr1::shared_ptr<RayTraceRecorder> RayTraceRecorderPtr;

}

#endif // RAYTRACERECORDER_H
